Skip to content

Conversation

@colinmurphy
Copy link
Member

@colinmurphy colinmurphy commented Feb 7, 2025

Fixes #2037

Tasks

  • I have signed a Contributor License Agreement (CLA) with WP Engine.
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description

Issue since 1.6.0 where by if you pass a null value for content_replacement it will throw a 500 error.

In 1.6.0 we changed the method signature for content_replacement from content_replacement($content) to content_replacement( string $content) which caused issues for anyone passing a null value for content replacement in Faust WP.

Related Issue(s):

#2037

Testing

Tested locally with both single and multisite.

Screenshots

Testing content replacement on multisite.

image

Documentation Changes

N/A

Dependant PRs

N/A

…null values. Added unit tests and added a try and catch aswell to catch any future issues.
@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: b4b6960

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2025

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@colinmurphy colinmurphy marked this pull request as ready for review February 7, 2025 10:35
@colinmurphy colinmurphy requested a review from a team as a code owner February 7, 2025 10:35
@colinmurphy colinmurphy changed the title Bug: Fixed content replacment null value Bug: Fixed content replacment to allow null values Feb 7, 2025
@colinmurphy colinmurphy requested a review from theodesp February 7, 2025 12:36
@colinmurphy colinmurphy merged commit 4dddd20 into canary Feb 7, 2025
17 checks passed
@colinmurphy colinmurphy deleted the bug-content-replacement-null-values branch February 7, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content Replacment null values

3 participants